<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title>生产系统</title>

    <link rel="shortcut icon" href="favicon.ico"> <link href="css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="css/font-awesome.css?v=4.4.0" rel="stylesheet">

    <link href="css/animate.css" rel="stylesheet">
    <link href="css/style.css?v=4.1.0" rel="stylesheet">
    <!--[if lt IE 9]>
    <meta http-equiv="refresh" content="0;ie.html" />
    <![endif]-->
    <script>if(window.top !== window.self){ window.top.location = window.location;}</script>
</head>

<body class="gray-bg">

    <div class="middle-box text-center loginscreen  animated fadeInDown">
        <div>
            <div>

                <img src="img/logo.png">

            </div>
            <h3>欢迎使用在线生产赋码系统</h3>

            <form class="m-t" role="form" >
                <div class="form-group">
                    <input id="user" value="admin" type="text" class="form-control" placeholder="用户名" required="">
                </div>
                <div class="form-group">
                    <input id="pwd" value="123456" type="password" class="form-control" placeholder="密码" required="">
                </div>
                <button type="button" onclick="login()" class="btn btn-success block full-width m-b">登 录</button>


                </p>

            </form>
        </div>
    </div>

    <!-- 全局js -->
    <script src="js/jquery.min.js?v=2.1.4"></script>
    <script src="js/bootstrap.min.js?v=3.3.6"></script>
    <script src="js/plugins/layer/layer.min.js"></script>
    <script src="js/tm/edit.js"></script>
    <script>

        function showLoad(){
            layer.load(2,{
                shade: [0.5, 'gray'], //0.5透明度的灰色背景
                content:"系统启动中，请稍后",
                success: function (layero) {
                    layero.find('.layui-layer-content').css({
                        'padding-top': '39px',
                        'margin-left' :'39px',
                        'width' :'120px',
                        'background-position-x':'30px'
                    });
                }
            });
        }
        function login(){
            let username = $("#user").val();
            let pwd = $("#pwd").val();
            sendData("//produce/login?username="+username+"&pwd="+pwd,{},function(res){
                if(res.data){
                    location.href = "index.html";
                }else{
                    layer.msg("密码错误");
                }
            });
            // if(username == 'admin' && pwd == '123456'){
            //         location.href = "index.html";
            // }
        }

    </script>
    <!--统计代码，可删除-->

</body>

</html>
